﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Staticage.Data
{
    /// <summary>
    /// 可添加附件的对象
    /// </summary>
    public interface IAttach : IDisposable
    {
        /// <summary>
        /// 添加附件
        /// </summary>
        /// <param name="creator">添加人</param>
        /// <param name="name">附件名称</param>
        /// <param name="bytes">附件内容</param>
        void AddAttachment(string creator, string name, byte[] bytes);

        /// <summary>
        /// 删除附件
        /// </summary>
        /// <param name="creator">待删除附件的创建人</param>
        /// <param name="name">待删除附件的名称</param>
        void DeleteAttachment(string creator, string name);

        /// <summary>
        /// 获取当前附件列表
        /// </summary>
        /// <returns>附件列表</returns>
        IEnumerable<AttachmentInfo> GetAttachmentInfos();
    }
}
